// void, Obj me

Unit this;
  
this = me.AsUnit();
Sleep(rand(100)+10000);
while (!.Stop(1000));

//.pr("peaceful::idle: started");
while(1){
	
	if(.Stop(2000)){
	
		.Idle(2000); 
		//.pr("peaceful::idle: idling");
		if(.IsValid)
		if(.IsHeirOf("Wagon")){
			if(.InHolder){
				Settlement sett;
				sett = .GetHolderSett();
				if(!sett.IsValid){
					if(.GetShipToBoard.IsValid){
						if(.name != ""){
							Unit u;
							u = GetNamedObj(.AsWagon.name).obj.AsHero;
							if(u.IsValid){
								Sleep(rand(100)+10);
								.AddCommand(true, "follow", u);
								return;
							}
						}
					}
				}
			}
		}
	}
}
